package com.lsh.mapper;

import com.lsh.pojo.student;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface StuMapper {

    @Select("select * from stu_management.student")
    List<student> list();


    @Select("select * from stu_management.student where sno = #{sno}")
    student getById(String sno);

    @Insert("insert into stu_management.student(sno, name, gender, tel, entrydate) values (#{sno}, #{name}, #{gender}, #{tel}, #{entrydate})")
    void addStu(student stu);


    void update(student stu);

    @Delete("call del_stu_co_case_id(#{sno})")
    void delete(String sno);

    student login(student stu);
}
